package com.pwt.repository;

import com.pwt.repository.base.BaseRepository;
import com.pwt.entity.Attachment;
import org.springframework.data.jpa.repository.Query;

/**
 * Attachment Repository层
 *
 * @author auto generated
 * @date 2021-09-02 10:43:16
 */
public interface AttachmentRepository extends BaseRepository<Attachment, String> {

    @Query("select count(1) from Attachment where md5 = ?1")
    int countByMd5(String md5);

    Attachment findByMd5(String md5);
}
